package com.zlzxm.shoesmarket.view.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.zlzxm.shoesmarket.R;
import com.zlzxm.shoesmarket.view.adapter.entity.EntityRepository;

import org.jetbrains.annotations.NotNull;

/**
 * Created by zlz
 * on  4/14/21
 */
public class ADRepository extends BaseQuickAdapter<EntityRepository, BaseViewHolder> {

    private static final String BROKERAGE = "手续费： ";
    private static final String TYPE = "仓库类型： ";

    public ADRepository() {
        super(R.layout.item_repository);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder holder, EntityRepository entity) {

        holder.setText(R.id.tvTitle,entity.getName());
        holder.setText(R.id.tvBrokerage,BROKERAGE+entity.getBrokerage());
        holder.setText(R.id.tvType,TYPE+entity.getType().getValue());

    }
}
